home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / lib / partman / init.d / 03kernelmodules_basicfilesystems < prev    next >
Text File  |  2008-10-29  |  1KB  |  60 lines

  1. #!/bin/sh
  2.  
  3. mkdir -p /var/lib/partman
  4.  
  5. cat /proc/modules |
  6. while read module_name x; do
  7.     if [ "$module_name" = ext2 ]; then
  8.         >/var/lib/partman/ext2
  9.     fi
  10.     if [ "$module_name" = vfat ]; then
  11.         >/var/lib/partman/vfat
  12.     fi
  13.     if [ "$module_name" = fuse ]; then
  14.         >/var/lib/partman/fuse
  15.     fi
  16.     if [ "$module_name" = ntfs ]; then
  17.         >/var/lib/partman/ntfs
  18.     fi
  19. done
  20.  
  21. if ! [ -f /var/lib/partman/ext2 ] && \
  22.    modprobe ext2  >/dev/null 2>/dev/null; then
  23.     >/var/lib/partman/ext2
  24. fi
  25.  
  26. if ! [ -f /var/lib/partman/vfat ] && \
  27.    modprobe vfat  >/dev/null 2>/dev/null; then
  28.     >/var/lib/partman/vfat
  29. fi
  30.  
  31. if ! [ -f /var/lib/partman/fuse ] && \
  32.    modprobe fuse  >/dev/null 2>/dev/null
  33. then
  34.     >/var/lib/partman/fuse
  35. fi
  36.  
  37. if type ntfs-3g >/dev/null 2>&1 && \
  38.    [ -f /var/lib/partman/fuse ] && \
  39.    grep -q fuseblk /proc/filesystems
  40. then
  41.     >/var/lib/partman/ntfs
  42.     >/var/lib/partman/ntfs-3g
  43. fi
  44.  
  45. if ! [ -f /var/lib/partman/ntfs ] && \
  46.    modprobe ntfs  >/dev/null 2>/dev/null
  47. then
  48.     >/var/lib/partman/ntfs
  49. fi
  50.  
  51. if grep -q ext2 /proc/filesystems; then
  52.     >/var/lib/partman/ext2
  53. fi
  54. if grep -q vfat /proc/filesystems; then
  55.     >/var/lib/partman/vfat
  56. fi
  57. if grep -q ntfs /proc/filesystems; then
  58.     >/var/lib/partman/ntfs
  59. fi
  60.